package jsyf.oa.entity.report;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Lenovo on 2017/11/24.
 */
@Entity
@Table(name = "T_RPT_TEMPLATE", schema = "oa", catalog = "")
public class TemplateEntity extends BaseEntity  implements Serializable {
     private String name;
     private Integer defaultFlag;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getDefaultFlag() {
        return defaultFlag;
    }

    public void setDefaultFlag(Integer defaultFlag) {
        this.defaultFlag = defaultFlag;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID",this.getId());
        json.put("NAME",this.getName());
        json.put("DEFAULT_FLAG",this.getDefaultFlag());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_RPT_TEMPLATE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID","id");
        json.put("NAME","name");
        json.put("DEFAULT_FLAG","defaultFlag");
        return json;
    }
}
